
#ifndef _COMMON_H
#define _COMMON_H

#if 1

#include <windows.h>
//#undef min

#define Rcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 12 );
#define Gcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 10 );
#define Bcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 9 );
#define Ccout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 11 );
#define Mcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 13 );
#define Ycout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 14 );
#define Wcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 15 );
#define Kcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 0 );
#define GRcout SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), 8 );

#endif

#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/opencv.hpp"

#include <vector>
#include <iomanip>
#include <iosfwd>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <direct.h>
#include <io.h>
#include <cstdlib>
#include <time.h>
#include <algorithm>
#include <set>
#include <numeric>
#include <list>
#include <map>
#include <stack>    
#include <cstddef>

using namespace cv;
using namespace std;


#ifndef Max
#define Max(a,b)   ( ( (a) > (b) ) ? (a) : (b) )
#endif

#ifndef Min
#define Min(a,b)   ( ( (a) < (b) ) ? (a) : (b) )
#endif

#ifndef Abs
#define Abs(a) ( (a) > 0 ? (a) : (-a) )

#endif

#ifndef PI
#define PI 3.14159265
#endif

#ifndef PI_2
#define PI_2 (PI/2.0)
#endif

#ifndef PI_4
#define PI_4 (PI_2/2.0)
#endif

#ifndef Eps
#define Eps 0.00001  

#endif

#ifndef BYTE
typedef unsigned char BYTE;
#endif

#ifndef Bool
typedef int Bool;
#endif

#ifndef True
#define True 1
#endif

#ifndef False
#define False 0
#endif



#endif